home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / p / pcqpascalv1.2d.lha / Include / Devices / Console.i < prev    next >
Text File  |  1997-05-06  |  3KB  |  118 lines

  1. {
  2.     Console.i for PCQ Pascal
  3.  
  4.     Console device command definitions.  Also see Utils/ConsoleUtils.i,
  5.     Utils/CRT.i, and Utils/ConsoleIO.i for more console.device
  6.     routines.
  7.  
  8.     To call the two routines defined below, you'll need to set
  9.     ConsoleBase to an appropriate value.  ConsoleUtils.i has a couple
  10.     of functions for doing just that.
  11. }
  12.  
  13.  
  14. {$I "Include:Exec/IO.i"}
  15. {$I "Include:Devices/InputEvent.i"}
  16.  
  17.  
  18. const
  19.  
  20. {***** Console commands *****}
  21.  
  22.      CD_ASKKEYMAP               = CMD_NONSTD + 0;
  23.      CD_SETKEYMAP               = CMD_NONSTD + 1;
  24.      CD_ASKDEFAULTKEYMAP        = CMD_NONSTD + 2;
  25.      CD_SETDEFAULTKEYMAP        = CMD_NONSTD + 3;
  26.  
  27.  
  28. {***** SGR parameters *****}
  29.  
  30.     SGR_PRIMARY         = 0;
  31.     SGR_BOLD            = 1;
  32.     SGR_ITALIC          = 3;
  33.     SGR_UNDERSCORE      = 4;
  34.     SGR_NEGATIVE        = 7;
  35.  
  36.     SGR_NORMAL          = 22;      { default foreground color, not bold }
  37.     SGR_NOTITALIC       = 23;
  38.     SGR_NOTUNDERSCORE   = 24;
  39.     SGR_POSITIVE        = 27;
  40.  
  41. { these names refer to the ANSI standard, not the implementation }
  42.  
  43.     SGR_BLACK           = 30;
  44.     SGR_RED             = 31;
  45.     SGR_GREEN           = 32;
  46.     SGR_YELLOW          = 33;
  47.     SGR_BLUE            = 34;
  48.     SGR_MAGENTA         = 35;
  49.     SGR_CYAN            = 36;
  50.     SGR_WHITE           = 37;
  51.     SGR_DEFAULT         = 39;
  52.  
  53.     SGR_BLACKBG         = 40;
  54.     SGR_REDBG           = 41;
  55.     SGR_GREENBG         = 42;
  56.     SGR_YELLOWBG        = 43;
  57.     SGR_BLUEBG          = 44;
  58.     SGR_MAGENTABG       = 45;
  59.     SGR_CYANBG          = 46;
  60.     SGR_WHITEBG         = 47;
  61.     SGR_DEFAULTBG       = 49;
  62.  
  63. { these names refer to the implementation, they are the preferred   }
  64. { names for use with the Amiga console device.        }
  65.  
  66.     SGR_CLR0            = 30;
  67.     SGR_CLR1            = 31;
  68.     SGR_CLR2            = 32;
  69.     SGR_CLR3            = 33;
  70.     SGR_CLR4            = 34;
  71.     SGR_CLR5            = 35;
  72.     SGR_CLR6            = 36;
  73.     SGR_CLR7            = 37;
  74.  
  75.     SGR_CLR0BG          = 40;
  76.     SGR_CLR1BG          = 41;
  77.     SGR_CLR2BG          = 42;
  78.     SGR_CLR3BG          = 43;
  79.     SGR_CLR4BG          = 44;
  80.     SGR_CLR5BG          = 45;
  81.     SGR_CLR6BG          = 46;
  82.     SGR_CLR7BG          = 47;
  83.  
  84.  
  85. {***** DSR parameters *****}
  86.  
  87.     DSR_CPR             = 6;
  88.  
  89. {***** CTC parameters *****}
  90.  
  91.     CTC_HSETTAB         = 0;
  92.     CTC_HCLRTAB         = 2;
  93.     CTC_HCLRTABSALL     = 5;
  94.  
  95. {*****   TBC parameters *****}
  96.  
  97.     TBC_HCLRTAB         = 0;
  98.     TBC_HCLRTABSALL     = 3;
  99.  
  100. {*****   SM and RM parameters *****}
  101.  
  102.     M_LNM               = 20;           { linefeed newline mode }
  103.     M_ASM               = '>1';         { auto scroll mode }
  104.     M_AWM               = '?7';         { auto wrap mode }
  105.  
  106. var
  107.     ConsoleBase : Address;
  108.  
  109. Function RawKeyConvert(event : InputEventPtr; Buffer : String;
  110.                         Length : Integer; KeyMap : Address) : Integer;
  111.     External;
  112.       { Converts a raw input key using the current keymap.  Also see
  113.         Include/Utils/DeadKeyConvert, which is more powerful and often
  114.         easier to use. }
  115.  
  116. Function CDInputHandler(events : InputEventPtr; con : Address) : InputEventPtr;
  117.     External;
  118.